package com.citywithincity.api;

import java.util.ArrayList;
import java.util.List;

import com.citywithincity.interfaces.IService;
import com.damai.action.Actions;
import com.damai.action.aop.Interceptor;
import com.damai.plugins.IPlugin;

public abstract class AbsModule {
	private List<IPlugin> plugins = new ArrayList<IPlugin>();
	
	public void addPlugn(IPlugin plugin){
		plugins.add(plugin);
	}
	
	
	/**
	 * 这个方法只有自动的有效，否则无效
	 * @param className
	 */
	public void onVisitClass(String className){
		
	}
	
	/**
	 * 
	 * @param actions
	 */
	public abstract void registerActions(Actions actions);

	/**
	 * 
	 * @param plugins
	 */
	public abstract void registerPlugins(List<IPlugin> plugins);

	/**
	 * 
	 */
	public abstract void beforeStart();

	/**
	 * 
	 */
	public abstract void shutDown() ;

	/**
	 * 
	 */
	public void beforeBindControllers() {
		
	}
	
	/**
	 * 
	 * @param interceptors
	 */
	public void registerIntercepters(List<Interceptor> interceptors) {
		
	}

	/**
	 * 
	 * @param services
	 */
	public void registerService(List<IService> services) {
		
	}
	
}
